<template>
  <div>
      <basic-dialog :visible="show"
               minWidth="500px"
               title="示例"
               :isShowClose="true"
               :isFullScreen="false"
               @close="$emit('close')">
        <q-card-section  style="min-height: 150px">
          <header class="text-center font-18 q-mt-sm" style="min-height: 40px">{{examplesData.businessName || '--'}}</header>
          <main class="q-mb-sm">{{examplesData.content}}</main>
        </q-card-section>
      </basic-dialog>
  </div>
</template>
<script>
// import MESSAGELIST from 'src/boot/factory/msg-list.js'
// const { getMessageDetail } = MESSAGELIST
export default {
  name: 'msg-detail-dialog',
  props: {
    show: Boolean,
    detailData: Object
  },
  data () {
    return {
      examplesData: {
        businessName: '',
        content: ''
      }
    }
  },
  watch: {
    show (val) {
      if (val) {
        this.getMessageDetail()
      }
    }
  },
  methods: {
    resetData () {
      this.examplesData = {
        businessName: '',
        content: ''
      }
    },
    getMessageDetail () {
      this.resetData()
      const { businessName, sample } = this.detailData
      this.$set(this.examplesData, 'businessName', businessName)
      this.$set(this.examplesData, 'content', sample)
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
